<html>
 <head>
        <title>[var.TITLE]</title>
        <link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
        <link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
        <script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/doiMenuDOM.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/functions.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.php"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.cfg"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsformgrid.php?session=[var.SessionVar]"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsverify.php?session=[var.SessionVar]"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsinit.php?session=[var.SessionVar]"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jquery.js"></script>
        
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

         <table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
                <tr>
                        <td>[tbs_include.onshow;file=[var.HTMLHeader];getob;]</td>
                </tr>
                <tr>
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                        <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                                <tr>
                                        <td background="[var.ROOT_IMG_DIR]/back-menu.gif">
                                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                                <tr>
                                                        <td>
                                                        <script language="JavaScript" type="text/JavaScript">menu.Build();</script>
                                                  </td>
                                                  <td class="head-login">Login as [var.USERPROFILE_NAME]</td>
                                                </tr>
                                          </table>
                                        </td>
                                </tr>
                                <tr>
                                        <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                        </table>
                        </td>
                </tr>
                <tr height="100%">
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                                <tr valign="top">
                                        <td width="100%">
                                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                                        <tr>
                                                                <td class="head-path"></td>
                                                                <td class="corner-date">[var.CORNER_DATE]</td>
                                                        </tr>
                                                </table>
                                                <table border="0" cellspacing="0" cellpadding="5" width="100%">
                                                        <tr>
                                                                <td class="FacetHeaderContent" >.:[var.SubHeaderTitle]:.</td>
                                                        </tr>
                                                </table>

                                                <table border="0" cellspacing="0" cellpadding="5" width="100%">
                                                        <tr>
                                                          <td class="contentTitle">
                                                                Menu
                                                          </td>
                                                        </tr>
                                                        <tr>
                                                          <td class="content2">

                                                                <table cellspacing="2" cellpadding="0">
                                                                 <tr>
                                                                   <td>
                                                                    <input type="button" name="Action" value="<<Back" class="button" onClick="self.location.replace('[sys.script_name]')">
                                                                   </td>
                                                                   <td>
                                                                    <input type="button" name="Action" value="Done" class="button" onClick="self.location.replace('[var.SERVER_URL]')">
                                                                   </td>
                                                                 </tr>
                                                                </table>
                                                          </td>
                                                        </tr>
                                                        <tr>
                                                          <td class="content2">
                                                        <!-- FORM SECTION -->
                                                        <table border="0" cellspacing="0" cellpadding="0" align="left">
                                                        
                                                        <form method="post" action="[var.FormAction]" name="[var.HTMLFormName]" ONSUBMIT="if (this.submitted) return true; else return false;">
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Services Package ID</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">
                                                                        [tbs_check;htmlconv=no;if [var.FormMode]=Edit;then
                                                                        '<input type="text" name="services_paket_header_id" value="[headblv.services_paket_header_id;noerr]" maxlength="255" size="10" onblur="[var.InitFunction]" onkeyup="this.value=this.value.toUpperCase()" class="input" "readonly">'
                                                                        ;else 'AUTO NUMBERED BY SYSTEM <input type="hidden" name="services_paket_header_id" value="AUTO NUMBERED BY SYSTEM">']
                                                                    </td>
                                                                    <!--<td class="fieldCaption"><input type="text" name="(bln.project_id)" value="[headblv.project_id;noerr]" maxlength="255" size="10" onblur='[var.InitFunction]' onkeyup="this.value=this.value.toUpperCase()" class="input" [tbs_check;if [var.FormMode]=Edit;then 'readonly';else '']></td>-->
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Nama paket</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">                                                                       
                                                                       <input type="text" name="nama_paket" value="[headblv.nama_paket;noerr]" maxlength="255" size="30" id="input">
                                                                    </td>
                                                                  </tr>
                                                                  <!--
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Services</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">                                                                       
                                                                       <select name="services_id" class="input">
																			  <option value="">-</option>
																			  <option value="[services.services_id;noerr]">[services.services_name;block=option;noerr]</option>
																			  <option>[tbs_check;if [headblv.services_id;noerr]!='';then [headblv.services_id;noerr] ;else '';selected;noerr]</option>
																	   </select>
                                                                    </td>
                                                                  </tr>
                                                                  -->
                                                                                                                                   

                                                                 <!--Edited by Adit van Smith-->

                                                         </table>
                                                         <!-- FORM SECTION -->
                                                                </td>
                                                        </tr>
                                                </table>
                                                
                                                
                                                
                                                <!--GRID-->

												<hr size="1" color="DFDFDF">
												<div id="spanHeader" style="height: 25px; vertical-align: top; overflow-y: noscroll;">
												<table border="0" width="1600" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="left">

														<tr>
																<td nowrap class="FacetColumnTD" align="center" width="50">X</td>
																<td nowrap class="FacetColumnTD" align="center" width="50">No.</td>
																<td nowrap class="FacetColumnTD" align="center">Services</td>																
														</tr>
												</table>
												</div>




												<div id="spanDetail" class="tariffgrid" style="height: 200px; vertical-align: top; overflow: auto;">

													<!--Edited by van Smith-->

													<table border="0" width="1600" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="left">

														<tr id="[blg.#]" style="display:[blg._display;noerr]">

																<td nowrap class="FacetDataTD" align="center" width="50">
																  <input type="checkbox" name="txtCheck[blg.#]" value="[blg.act_id;noerr]" class="inputRadio">
																  <input type=hidden name="dk[blg.#]" value="D">
																</td>

																<td nowrap class="FacetDataTD" align="right" width="50" align="right">
																  [blg.#;block=tr].
																  <input type="hidden" name="jo_id[blg.#]" value="[tbs_check;if [var.jo_id;noerr]!='';then [var.jo_id;noerr] ;else '']">
																</td>

																<td nowrap class="FacetColumnTD" align="center">

																   <select name="debturList[blg.#]" id="input" onchange="GetServices(this.value,'[blg.#]');">
																	 <option value="" selected>Services</option>
																	 <option value="1">Select</option>
																   </select>
																   <input type="hidden" name="services_id[blg.#]" value="[blg.services_id;noerr]" id="input">
																   <input type="hidden" name="services_code[blg.#]" value="[blg.services_code;noerr]" class="input">
																   <input type="text" name="services_name[blg.#]" value="[blg.services_name;noerr]" maxlength="255" size="50" id="input"  class="gridBox" readonly>
																</td>								

															</tr>
													</table>

													<!--End Edited by van Smith-->

												</div>

												<!--END GRID-->
                                                
                                                
                                                                                               
                                                <!--BUTTON-->
                                                <div id="spanButton" style="height: 35px; vertical-align: top; overflow-y: noscroll;">
                                                <table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="left">
                                                        <tr>
                                                            <td align="right" class="FacetColumnTD">

                                                                   <table border="0" cellspacing="2" cellpadding="0">
                                                                           <tr>                                                                                  
                                                                                   <td>
																					 <input name="FormAction" type="button" value="Next Line" class="button" onClick="return (AddFormGridProject(this,'[var.HTMLFormName].services_name'))">
																				   </td>
																				   <td>
																						<input name="FormAction" type="button" value="Delete Line" class="button" onClick="DeleteLines()">
																				   </td>
                                                                                   <td>
                                                                                     <input name="FormAction" type="submit" value="Save" class="button"  ONCLICK="this.form.submitted = true;">
                                                                                   </td>
                                                                                  
                                                                                   <td>[tbs_check;block=td;if [var.USER_CANDELETE]=1]
																					<input type="button" name="Action" value="Delete" class="button" onClick="if (confirm('Are you sure want to delete ?')) {document.[var.HTMLFormName].action='[sys.script_name]?FormAction=Delete&[var.PRIMARY_KEY]=[var.PRIMARY_VALUE]&PageMode=Form&form=[var.HTMLFormName]';[var.HTMLFormName].submit();}">
																				   </td>
																				   
                                                                                   <td>
                                                                                     <input name="FormAction" type="submit" value="Cancel" class="button" onClick="self.location.replace('[sys.script_name]')">
                                                                                   </td>
                                                                           </tr>
                                                                   </table>


                                                            </td>
                                                                </td>
                                                        </tr>
                                                        </form>
                                                </table>
                                                </div>
                                                
                                                <!--END BUTTON-->
                                                
                                                
                                        </td>
                                </tr>
                        </table>
                        </td>
                </tr>

                <tr>
                        <td>
                        <br>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                        <td class="footer1"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                                <!--tr>
                                        <td class="footer2">Prototype Test - Web Application</td>
                                </tr-->
                        </table>
                        </td>
                </tr>
         </table>
 </body>
<iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="[var.ROOT_DIR]js/Calendar/pop/ipopeng.htm" scrolling="no" frameborder="0" style="LEFT: -500px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; Z-INDEX: 999"></iframe>
 
</html>


<script>

 [var.InitFunction]
  
 
 function GetServices(val,no_urut) {
      newwin = window.open("ais_setup_serviceslist.php?FormName=[var.HTMLFormName]&no_urut="+no_urut,"toolcalc","height=400,width=640,noscroll,resizable");
 }
 
 
 function DeleteLines(){
    $("input[name^=txtCheck]").each(
      function(){
        if($(this).attr('checked')) {
            //alert($(this).val());
            var num = String($(this).attr('name')).replace('txtCheck','');
            //alert('num: ' + num);
            $('tr#'+num).remove();
        }
      }
    );
 }
 
 
 
 function AddFormGridProject (cname,firstelemen) {
    var lastname ="";
    
    
    $(".gridBox:visible").each(function(n) {
        n = n+1;
        reccount = n;
        lastname = this.name;
    });

    lastname = lastname.substring(13);

    lastname = parseInt(lastname)+1;

    //reccount = 5;
    reccount = parseInt(reccount)+1;

    //alert("reccount: " + reccount);

    if (reccount>=100) {
        cname.disabled = true;
    }

    var objrow = document.getElementById(lastname);

    if (objrow.style.display == 'none') {
        objrow.style.display = '';
    }

    eval(firstelemen+''+lastname+'.focus()');

    return false;
}
 
 

</script>



